Add tests for Special:BlankPage
authoraddshore <addshorewiki@gmail.com>
Mon, 6 Jul 2015 10:49:58 +0000 (12:49 +0200)
committerLegoktm <legoktm.wikipedia@gmail.com>
Mon, 6 Jul 2015 19:20:30 +0000 (19:20 +0000)
This uses SpecialPageTestBase and demonstrates how that class
should be used.

Change-Id: Ibbf3fdcb172d7c1c71491d27b534faa65fd9be63

tests/phpunit/includes/specials/SpecialBlankPageTest.php [new file with mode: 0644]

diff --git a/tests/phpunit/includes/specials/SpecialBlankPageTest.php b/tests/phpunit/includes/specials/SpecialBlankPageTest.php
new file mode 100644 (file)
index 0000000..1d4f5e5
--- /dev/null
@@ -0,0 +1,25 @@
+<?php
+
+/**
+ * @licence GNU GPL v2+
+ * @author Adam Shorland
+ *
+ * @covers SpecialBlankpage
+ */
+class SpecialBlankPageTest extends SpecialPageTestBase {
+
+       /**
+        * Returns a new instance of the special page under test.
+        *
+        * @return SpecialPage
+        */
+       protected function newSpecialPage() {
+               return new SpecialBlankpage();
+       }
+
+       public function testHasWikiMsg() {
+               list( $html, ) = $this->executeSpecialPage();
+               $this->assertContains( wfMessage( 'intentionallyblankpage' )->text(), $html );
+       }
+
+}